//路模块加载
import VueRouter from 'vue-router';



import Vue from 'vue'//核心语法模块

Vue.use(VueRouter);//为Vue添加扩展或插件
import homePage from "./views/homePage"
import filmDetailPage from "./views/filmDetailPage"
import filmsPage from "./views/filmsPage"
import foun404 from './components/foun404.vue'
const opt = {
    mode:"history",
    routes:[
        {path:'*',component:foun404},
        {path:'/',redirect:'/home'},
        {path:'/home',name:'home',component:homePage,},
        {path:'/films',name:'films',component:filmsPage, meta:{showbun:true}},
        {path:'/detail/:typeId/:filmName',component:filmDetailPage, meta:{showbun:true,showbut:true,bottomName:'bottom'}}
    ]
}
// 构建当前项目的独立路由
const router = new VueRouter(opt);

export default router;